﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TinyROS
{
    namespace Messages
    {
        public abstract class Message
        {

        }
        public class StandardMessage : Message
        {
            public MessageHead Header { get; }
            public object Value { get; }
            protected StandardMessage(string name, object sender)
            {
                this.Header = new(name, sender);
            }
            public StandardMessage(object value, object sender)
            {
                this.Value = value;
                this.Header = new("StandardMessage", sender);
            }
        }
        public class MessageHead
        {
            public string Name { get; }
            public DateTime Time { get; }
            public object Sender { get; }
            public MessageHead(string name, object sender)
            {
                this.Name = name;
                this.Time = DateTime.Now;
                this.Sender = sender;
            }

        }

    }
}
